//
//  SAOverallSetting.h
//  Saas
//
//  Created by 杨荣 on 2020/4/8.
//  Copyright © 2020 bing. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SAUser.h"// 当前用户（员工）
#import "SAPrinterSetting.h"// 打印机设置
@class SACommoditySpecialFeesModel;
NS_ASSUME_NONNULL_BEGIN


/// 全局设置-数据对象
@interface SAOverallSetting : NSObject

+ (SAOverallSetting *)shareInstance;



@property (nonatomic,strong) SAUser *user;//  当前用户（员工）

@property (nonatomic,strong) SAPrinterSetting *printerSetting;// 打印机设置

@property (nonatomic,assign) BOOL isShowStock;// 是否显示库存
@property (nonatomic,assign) NSInteger latestSellPriceType;// 最近拿货价类型： 0-不显示最近拿货价    1-只显示最近拿货价     2-取最近开单
@property (nonatomic,assign) BOOL isShowReplenishment;// 是否显示补货标识
@property (nonatomic,assign) BOOL isShowReplenishmentReturn;// 是否显示补货退货标识
@property (nonatomic,assign) NSInteger timeLimitReturn;// 期限退货： 0-无限期    N>0-嫌弃退货N天
@property (nonatomic,assign) CGFloat lowestSellPriceType;// 最低销售价类型： 0-无限制    (0,1)-不低于固定比例     >1-不低于固定金额
@property (nonatomic,assign) BOOL isShowlatestRemark;// 是否显示最近拿货的备注
@property (nonatomic,copy) NSArray <NSDictionary *>*specialExpensesArray;// 特殊费用 {"name","id"}
@property (nonatomic,assign) BOOL isShowBarcode;// 是否显示条码  0-关闭    1-开启

@property (nonatomic,strong) SACommoditySpecialFeesModel *labelLayout;// 标签排版
@property (nonatomic,strong) SACommoditySpecialFeesModel *labelLayoutAttribute;// 标签排版属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *ticketLayoutAttribute;// 小票排版属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *printSize;

@property (nonatomic,strong) SACommoditySpecialFeesModel *labelLayoutAttribute4030;// 标签排版属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *labelLayoutAttribute4060;// 标签排版属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *labelLayoutAttribute4080;// 标签排版属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *labelLayoutAttribute3020;// 标签排版属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *labelLayoutAttribute6040;// 标签排版属性

@property (nonatomic,strong) SACommoditySpecialFeesModel *ticketFontSize;// 小票字体

@property (nonatomic,strong) SACommoditySpecialFeesModel *sizeValue4030;// 标签字体属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *sizeValue4060;// 标签字体属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *sizeValue4080;// 标签字体属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *sizeValue3020;// 标签字体属性
@property (nonatomic,strong) SACommoditySpecialFeesModel *sizeValue6040;// 标签字体属性

@property (nonatomic,strong) SACommoditySpecialFeesModel *settlementMethod;

@property (nonatomic,strong) SACommoditySpecialFeesModel *hkSymbol;//显示港币

/// 获取全局设置
/// @param successBlock 成功
/// @param failBlock 失败
- (void)requestByGetOverallSettingWithSuccessBlock:(NetworkingSuccessBlock)successBlock
                                         failBlock:(NetworkingFailBlock)failBlock;

// 更新【是否显示库存】
- (void)requestByUpdateIsShowStockWithSuccessBlock:(NetworkingSuccessBlock)successBlock
                                         failBlock:(NetworkingFailBlock)failBlock;

// 更新【最近拿货价】
- (void)requestByUpdateLatestSellPriceTypeSuccessBlock:(NetworkingSuccessBlock)successBlock
                                             failBlock:(NetworkingFailBlock)failBlock;

// 更新【是否显示补货标识】
- (void)requestByUpdateIsShowReplenishmentWithSuccessBlock:(NetworkingSuccessBlock)successBlock
                                                 failBlock:(NetworkingFailBlock)failBlock;

// 更新【是否显示补货退货标识】
- (void)requestByUpdateIsShowReplenishmentReturnWithSuccessBlock:(NetworkingSuccessBlock)successBlock
                                                       failBlock:(NetworkingFailBlock)failBlock;

// 更新【期限退货】
- (void)requestByUpdateTimeLimitReturnSuccessBlock:(NetworkingSuccessBlock)successBlock
                                         failBlock:(NetworkingFailBlock)failBlock;
// 更新【最低销售价】
- (void)requestByUpdateLowestSellPriceTypeSuccessBlock:(NetworkingSuccessBlock)successBlock
                                             failBlock:(NetworkingFailBlock)failBlock;


// 更新【是否显示最近拿货的备注】
- (void)requestByUpdateIsShowlatestRemarkWithSuccessBlock:(NetworkingSuccessBlock)successBlock
                                                failBlock:(NetworkingFailBlock)failBlock;


// 更新【是否显示条码】
- (void)requestByUpdateIsShowBarcodeWithSuccessBlock:(NetworkingSuccessBlock)successBlock
                                           failBlock:(NetworkingFailBlock)failBlock;


// 添加【特殊费用】
- (void)requestByAddSpecialExpense:(NSString *)specialExpense
                       uccessBlock:(NetworkingSuccessBlock)successBlock
                         failBlock:(NetworkingFailBlock)failBlock;

// 更新【特殊费用】
- (void)requestByUpdateSpecialExpenses:(NSArray <NSDictionary *>*)specialExpenses
                           uccessBlock:(NetworkingSuccessBlock)successBlock
                             failBlock:(NetworkingFailBlock)failBlock;

// 更新【结算方式】
- (void)requestByUpdateSettlementTypeSuccessBlock:(NetworkingSuccessBlock)successBlock
                                             failBlock:(NetworkingFailBlock)failBlock;

@end




NS_ASSUME_NONNULL_END
